home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / index.arc / AEBITOPE.BAS < prev    next >
Encoding:
BASIC Source File  |  1987-01-11  |  1.1 KB  |  39 lines

  1. rem $linesize:132
  2. rem $title:'Application Engineer Standard Routines'
  3. rem $subtitle:'Open an index'
  4.  
  5. '                Include the COMMON values
  6. rem $include:'AESHARED.BAS'            
  7.  
  8. sub bit.open(fl%,hn$) static
  9.  
  10. '  open the header, read info and close the header
  11.  
  12.         aesb.fatal%=0%
  13.  
  14.         if fl%>15% or fl%<1% or fl%>ubound(xh%,1) or fl%<lbound(xh%,1) then
  15.             aesb.fatal%=1
  16.         else
  17.             idx.nam$(fl%)=hn$
  18.             open "r",fl%,hn$+".hdr",512
  19.             field #fl%,32 as desc$,32 as xmast$,2 as klen$,2 as nok$,2 as nexav$
  20.             field #fl%,70 as twit$,2 as kdel$,440 as spare$
  21.             get #fl%,1
  22.             mfile$=xmast$
  23.             xh%(fl%,1)=cvi(klen$)
  24.             xh%(fl%,2)=cvi(nok$)
  25.             xh%(fl%,3)=cvi(nexav$)
  26.             xh%(fl%,4)=cvi(kdel$)
  27.             close fl%
  28.             open "r",fl%,mfile$,xh%(fl%,1)+10
  29.             field #fl%,xh%(fl%,1) as xk$(fl%,1),2 as xk$(fl%,2),2 as xk$(fl%,3)
  30.             field #fl%,xh%(fl%,1)+4 as twit$,2 as xk$(fl%,4),2 as xk$(fl%,5),2 as xk$(fl%,6)
  31.             lset xk$(fl%,1)=string$(xh%(fl%,1),0)
  32.             for init%=2 to 6
  33.                 lset xk$(fl%,init%)=mki$(0)
  34.             next init%
  35.             put #fl%,xh%(fl%,3)
  36.         end if
  37.  
  38.     end sub
  39.